#! usr/bin/env python
import rospy
from turtlesim.msg import Pose

def doPose(pose):
    x = pose.x
    y = pose.y
    theta = pose.theta
    lv = pose.linear_velocity
    av = pose.angular_velocity
    rospy.loginfo("王八位置信息：坐标（%.2f,%.2f）,朝向：%.2f,线速度：%.2f,角速度：%.2f",x,y,theta,lv,av)
    print("=============================")



if __name__ == "__main__":
    rospy.init_node("sub_turtle")
    sub = rospy.Subscriber("/turtle1/pose",Pose,doPose,queue_size=100)
    rospy.spin()
